package com.zc.ssb.java.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @program: scala-springboot
 * @description: JavaTestController
 * @author: zengchen
 * @create: 2021-03-15 15:51
 **/
@RestController
@RequestMapping("java")
public class JavaTestController {

    private static final Logger log = LoggerFactory.getLogger(JavaTestController.class);

    @ResponseBody
    @RequestMapping("randomNum")
    public Object randomNum(){
        return ThreadLocalRandom.current().nextInt(10);
    }
}
